﻿#ifndef LIBSSHPARAMS_H
#define LIBSSHPARAMS_H

#include <QObject>
class libsshSftpFileInfo{
    public:
        QString name;
        QString permission;
        QString size;
        QString type;
        QString owner;
        QString group;
        QString modifyTime;
        quint64 _size;
        bool dirLink;//是否是文件夹链接
};
#define READ_USER 0400
#define WRITE_USER 0200
#define EXE_USER 0100

#define READ_GROUP 0040
#define WRITE_GROUP 0020
#define EXE_GROUP 0010

#define READ_OTHER 0004
#define WRITE_OTHER 0002
#define EXE_OTHER 0001

class libsshParams:public QObject
{
    Q_OBJECT
public:
    libsshParams(QObject *parent=nullptr);
    enum AuthenticationType {
        AuthenticationTypePassword,
        AuthenticationTypePublicKey,
        AuthenticationTypeKeyboardInteractive,

        // Some servers disable "password", others disable "keyboard-interactive".
        AuthenticationTypeTryAllPasswordBasedMethods
    };

    QString userName;
    QString passWord;

    QString host;
    QString privateKeyFile;
    int timeout; // In seconds.
    AuthenticationType authenticationType;
    quint16 port;
};

#endif // LIBSSH2UTILS_H
